<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
<head>

<title>显示合同信息</title>
<link href="${pageContext.request.contextPath}/Styles/css.css"
	rel="stylesheet" type="text/css" />

<script type="text/javascript" src="${pageContext.request.contextPath}/Scripts/ie6png.js"></script>
<script type="text/javascript">
	DD_belatedPNG.fix('div,ul,li,a,p,img,body,dl,dt,dd');
</script>
<script type="text/javascript">
	function MM_jumpMenu(targ, selObj, restore) { //v3.0
		eval(targ + ".location='" + selObj.options[selObj.selectedIndex].value
				+ "'");
		if (restore)
			selObj.selectedIndex = 0;
	}
</script>
<script>
	/*第一种形式 第二种形式 更换显示样式*/
	function setTab(name, cursel, n) {
		for (i = 1; i <= n; i++) {
			var menu = document.getElementById(name + i);
			var con = document.getElementById("con_" + name + "_" + i);
			menu.className = i == cursel ? "hover" : "";
			con.style.display = i == cursel ? "block" : "none";
		}
	}
</script>

<script type="text/javascript">
	function deleteCheck() {
		var check = document.getElementsByName("checkbox1");
		var bool = false;
		for (var i = 0; i < check.length; i++) {
			if (check[i].checked) {
				bool = true;
				alert(check[i].value);
				window.location.href = "delete.do?contractId="
						+ check[i].value;
			}
		}
		if (bool == false || bool == null) {
			alert("请选择要删除的内容")
		}
	}
</script>

<script type="text/javascript">
	function updateCheck() {

		var check = document.getElementsByName("checkbox1");
		var bool = false;
		for (var i = 0; i < check.length; i++) {
			if (check[i].checked) {
				bool = true;
				alert(check[i].value);
				window.location = "toUpdate.do?contractId="
						+ check[i].value;
			}
		}
		if (bool == false || bool == null) {
			alert("请选择要查看的记录");
		}
	}
	function projects() {

	}
</script>


<script type="text/javascript">
	function Select() {
        
		var check = document.getElementById("secondParty").value;

				alert(check);
				/* window.location = "contract/getList.do?secondParty="
						+ check; */
				window.location = "${pageContext.request.contextPath}/contract/getList.do?secondParty=" + check;

	}
	function projects() {

	}
</script>
</head>
<body>
	<div class="yboxwidth boxcenter ybox01">
		<div class="ybox09"></div>
		<div class="ybox02">
			<table width="100%" border="0" cellspacing="0" cellpadding="0"
				class="margb4">
				<tr>
					<td class="ybox03td1"></td>
					<td class="ybox03td2"></td>
					<td class="ybox03td3"></td>
				</tr>
				<tr>
					<td class="ybox03td4"></td>
					<td class="ybox03td5">
					<div class="ybox05 margb8">
							<dl>
								<!-- <dt> <strong>【注】</strong>只能包含未开过盘的房间，系统将自动过滤。 </dt> -->
							</dl>
					</div>
<div class="ybox07 margb2">
	<dl>
           <dt> 
          
	            <strong></strong>&nbsp;&nbsp;
	              <!--   订单单号：<input type="text" id="customer_name"/> &nbsp;&nbsp;&nbsp;&nbsp; -->  
		       甲方名称：<select style="width: 150px;" id="firstParty" onchange="loadorder()">
		         <option value=""></option>
		        </select>
	                 乙方名称：<input style="width: 150px;" id="secondParty" value="${secondParty}"/>
		         
		        
		                客户名称：<select style="width: 150px;" id="customerName" onchange="loadorder()">
		         <option value=""></option>
		        </select>
		       <img onclick="Select()" src="${pageContext.request.contextPath}/Images/bottonselect.gif" width="50" height="20" style="vertical-align: middle;cursor: pointer;" />
	           
	          
           </dt>
    </dl>

				 <dl>
								<table border="0" cellspacing="0" cellpadding="0"
									class="ybox07table">
									<tr align="left">
										<td class="ybox07td1"><img
											src="${pageContext.request.contextPath}/Images/op4_1.gif" /></td>
										<td><a
											href="contract/toAdd.do">添加</a></td>
										<td class="ybox07td2"><img
											src="${pageContext.request.contextPath}/Images/op4_0.gif" /></td>
										<td class="ybox07td1"><img
											src="${pageContext.request.contextPath}/Images/op4_2.gif" /></td>
										<td><a href="javascript:void(0)" id="delete"
											onclick="deleteCheck()">移除选中订单</a></td>
										<td class="ybox07td2"><img
											src="${pageContext.request.contextPath}/Images/op4_0.gif" /></td>
										<td class="ybox07td1"><img
											src="${pageContext.request.contextPath}/Images/op4_3.gif" /></td>
										<td><a href="javascript:void(0)" id="update"
											onclick="updateCheck()">查看合同</a></td>
										<td class="ybox07td2"><img
											src="${pageContext.request.contextPath}/Images/op4_0.gif" /></td>
									</tr>
								</table>
					</dl>
</div>
						<table width="100%" border="0" cellpadding="0" cellspacing="1"
							class="ybox06table">
							<tr>
								<td width="3%" class="ybox06td01"><input type="checkbox"
									name="checkbox" id="checkbox" /></td>
								<td width="13%" class="ybox06td01">合同内容</td>
								<td width="15%" class="ybox06td01">签约时间</td>
								<td width="5%" class="ybox06td01">合同甲方</td>
								<td width="7%" class="ybox06td01">合同总价</td>
								<td width="7%" class="ybox06td01">客户名称</td>
								<td width="10%" class="ybox06td01">合同乙方</td>
								<td width="15%" class="ybox06td01">房间编号</td>
								<td width="30%" class="ybox06td01">付款方式</td>
							</tr>

							 <c:forEach items="${list}" var="contract">
								<tr>

									<td class="ybox06td02wcenter"><input type="checkbox"
										name="checkbox1" value="${contract.contractId}" /></td>
									
									<td class="ybox06td02wcenter">${contract.contractContent}</td>
									<td class="ybox06td02wcenter">${contract.signTime}</td>
									<td class="ybox06td02wleft">${contract.firstParty}</td>
									<td class="ybox06td02wleft">${contract.contractTotal}</td>
									<td class="ybox06td02wcenter">${contract.customerName}</td>
									<td class="ybox06td02wcenter">${contract.secondParty}</td>
									<td class="ybox06td02wcenter">${contract.roomId}</td>
									<td class="ybox06td02wcenter">${contract.payTypeName}</td>
								</tr>
							</c:forEach>
							
			
							
							
						</table>
						<div class="nums boxcenter black12">
							<a href="#" class="hovera">首 页</a><a href="#">上一页</a><a href="#">下一页</a><a
								href="#">尾 页</a>&nbsp;&nbsp;&nbsp;第1/3页&nbsp;&nbsp;&nbsp;每页&nbsp;
							<input name="textfield3" type="text" id="textfield" size="2" />
							&nbsp;条/共25条&nbsp;&nbsp;转到&nbsp; <input name="textfield3"
								type="text" id="textfield" size="2" /> &nbsp;页<a href="#">跳
								转</a>
						</div></td>
					<td class="ybox03td6"></td>
				</tr>
				<tr>
					<td class="ybox03td7"></td>
					<td class="ybox03td8"></td>
					<td class="ybox03td9"></td>
				</tr>
			</table>
			<table width="380" border="0" align="center" cellpadding="0"
				cellspacing="0">
				<tr>
					<td height="60" align="center"><a href="#"><img
							src="${pageContext.request.contextPath}/Images/botton01.gif"
							width="95" height="34" /></a></td>
					<td align="center"><a href="#"><img
							src="${pageContext.request.contextPath}/Images/botton02.gif"
							width="95" height="34" /></a></td>
				</tr>
			</table>
		</div>
	</div>
</body>
</html>